package com.ktjiaoyu.crm;

import com.ktjiaoyu.crm.entity.User;
import com.ktjiaoyu.crm.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

@RunWith(SpringRunner.class)
@SpringBootTest
public class UserMapperTester {
    @Resource
    private UserMapper userMapper;

    @Test
    public void testInsert() throws Exception{
        userMapper.insert(new User("ktjiaoyu","123456",2L,1));
    }
    @Test
    public void testGet(){
        User user=userMapper.get(4L);
        System.out.println("usrName:"+user.getUsrName());
    }
}


